package com.movie.api.controller;

import com.movie.api.model.entity.FilmMovie;
import com.movie.api.service.FilmMovieService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/api/movie")
public class FilmMovieController {
    @Resource
    private FilmMovieService filmMovieService;
    @GetMapping("/{id}")
    public FilmMovie selectById(@PathVariable Integer id){
        FilmMovie filmMovie = filmMovieService.selectId(id);
        log.info("film Movie：{}", String.valueOf(filmMovie));
        return filmMovie;
    }
}
